package io.github.yotta.logger.message.producer;

import com.google.common.eventbus.EventBus;
import io.github.yotta.logger.message.model.LogOperationDataMessage;

/**
 * @author yotta
 * @date 2023/3/22 19:24
 */
public class EventBusLogDataProducer implements LogDataProducer {

    private final EventBus eventBus;

    public EventBusLogDataProducer(EventBus eventBus) {
        this.eventBus = eventBus;
    }

    @Override
    public void sendLogData(LogOperationDataMessage logMsg) {
        eventBus.post(logMsg);
    }
}
